package com.webwork.mood.record.dataobject;

import java.util.ArrayList;
import java.util.List;

public enum Level {

	NULL, LOW, MEDIUM, HIGH;

	public Level[] useableValues() {
		List<Level> ret = new ArrayList<Level>();
		for (Level o : Level.values()) {
			ret.add(o);
		}
		return ret.toArray(new Level[ret.size()]);
	}
	
	public static Level fromString(String level) {
		for (Level o : Level.values()) {
			if (o.name().equalsIgnoreCase(level)) {
				return o;
			}
		}
		throw new IllegalArgumentException(level);
	}

}
